<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/get-host-info.js"></script>
<script>
'use strict';

if (window.location.origin != get_host_info().AUTHENTICATED_ORIGIN) {
  window.location = get_host_info().AUTHENTICATED_ORIGIN +
                    window.location.pathname;
} else {
  test(t => {
    assert_true(window.isSecureContext);
    assert_true(navigator.usb instanceof USB);
  }, 'navigator.usb is present in an insecure context');
}
</script>
